package com.erp.app.common.insert.beans;

import java.sql.Connection;

import com.erp.app.common.ProjectConstants;
import com.erp.app.common.insert.dao.InsertDAO;
import com.erp.framework.model.dao.ServiceLocator;
import com.erp.framework.model.delegate.SimpleSearchMaintStyleDelegate;
import com.erp.framework.util.logger.Logger;

public class InsertDelegate extends SimpleSearchMaintStyleDelegate {

    public void insertLoginLog(String companyCode, String userCode) throws java.sql.SQLException {
        Connection conn = null;
        try {
            conn = ServiceLocator.getInstance().getDSDBConnection();
            InsertDAO dao = new InsertDAO();
            dao.insertLoginLog(companyCode, userCode, conn);
        } catch (Exception e) {
        	Logger.logExceptions(this, e);
        } finally {
            try {
                if (conn != null)
                    conn.close();
            } catch (Exception e) {
            	Logger.logExceptions(this, e);
            }
        }

    }
}
